﻿using System;

namespace ElectronicCommerce.Framework
{
    /// <summary>
    /// Use to define the relationship between class and configuration key (in web.config)
    /// </summary>
    [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
    public class ServiceDomainAttribute : Attribute
    {
        private string _serviceDomain;

        /// <summary>
        /// related configuration key in web.config
        /// </summary>
        public string ServiceDomain
        {
            get
            {
                return _serviceDomain;
            }
        }

        /// <summary>
        /// Constructor for ConfigurationFileAttribute
        /// </summary>
        /// <param name="serviceDomain"></param>
        public ServiceDomainAttribute(string serviceDomain)
        {
            this._serviceDomain = serviceDomain;
        }
    }
}
